wicta2fandomcom-20200214-history
Starting WICT
This page explains how to start WICT and how to make zones.__FORCETOC__ Auto start If you want to Auto start WICT spawning open init.sqf and put how many second should pass before WICT starts. //{}{}{}{}{}{}{}{}{} AUTO START WICT{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{} // negative number means OFF, greater or equal than 0 = number of seconds _null = 5 execVM "WICT\autoStart.sqf"; However you might want to start WICT by trigger.... Making zones = starting from trigger Let's see which types of zones you can make in order to start WICT. Making SAFE zone You can start the script in many ways. However, you will probably want to start it when the player leaves some safe zone. For example, let that zone be around base which is HQ. Create a trigger, round (circle) or ellipse : : Why ellipse? You can make it different depending where player is heading -- script can be activated: *at the spawn distance - the base that you are leaving will be included in spawning process *under the spawn distance - the base won't be included When the player is present inside the zone, trigger will quit the WICT and when the player is not present in the zone, trigger will start it = SAFE ZONE ! If you start in the safe zone : how can it quit something that hasn’t even started yet? There is handling system that takes care of it, so don’t worry: * you cannot start this script twice in a row * you cannot quit the script if it hasn’t started or quit it twice in a row There is possibility that some spawned units “catch” you while you are not in the safe zone, so it’s not completely safe… Any nearby unit can track you down. It is safe because no more spawning will occur while you are there. Hence, you can catch your breath, rearm, but stay alert. Only repeatable triggers can deactivate, so don't forget to check that option. How to use #Create a trigger #Activation : anybody + present + repeatedly #Countdown (optional, but important for performance) : 1 + 2 + 5 #Condition: (vehicle player) in thislist #on Act.: WICT_state = "stop"; publicVariable "WICT_state"; hint "Welcome to the SAFE ZONE." #on Dea.: WICT_state = "start"; publicVariable "WICT_state"; hint "Semper Fi!" italic is optional Making HOT zone Hot zone is inverted safe zone -- you just switch On Act. and On Dea.. How to use #Create a trigger #Activation : anybody + present + repeatedly #Countdown (optional, but important for performance) : 1 + 2 + 5 #Condition: (vehicle player) in thislist #on Act.: WICT_state = "start"; publicVariable "WICT_state"; hint "At ease!" #on Dea.: WICT_state = "stop"; publicVariable "WICT_state"; hint “Welcome to the JUNGLE.” italic is optional Additional changes - spawning frequency Suppose that you set up WICT_time = 5, WICT_timeRand = 5. You can make a trigger manipulate WICT_time and WICT_timeRand during gameplay in the same manner as you did with WICT_state -- just don't forget to publicVariable. Example : : on Dea.: WICT_state = "stop"; publicVariable "WICT_state"; WICT_time = 2; WICT_timeRand = 2; publicVariable "WICT_time"; publicVariable "WICT_timeRand"; hint “Welcome to the JUNGLE.” Making TAMPON zone Another thing you can do is to combine two types of zones – safe zones and inverted safe zone (hot zone in other words). Make a large safe zone and inside make another zone / trigger that has switched On Act. and On Dea.. The result will be tampon zone – player will enter the safe zone (outer zone) and spawning will stop. After he enters the inner zone the spawning will start again. You can also combine this with hot zone so you can have nice ambush sites, for example after entering the city. Making irregular shape zones This is not a standard example and I personally didn’t try it, but here is the idea and how it works. It has bases in making algorithm determine is it inside polygon or outside polygon –ray casting algorithm. Basically you make several ellipsoid zones that overlap and form, for example, “a chain”. In other words, you want to cover some road, but not the sides, and the road is not straight. Now, plain starting and stopping doesn’t work because one zone can stop the other (…since they overlap player will exit one zone while still in the other, and that will terminate the script. And remember you cannot start it or stop it twice in a row.). The solution is that these zones won’t start or stop the script directly. You will make a global variable Tag_varname and .sqf script. This script will add +1 when player enters ANY of zones and add(!) -1 if player exits ANY of zones. The script will stop if that variable 0 and it will start for > 0. Simple as can be. Category:Getting started